/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Tokenizer;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Raito
 */
public class DataTokenizer {
    private Map<String,List<String>> dictionary = new HashMap<String,List<String>>();
    public void Insert(String key, String value)
    {
        if (dictionary.containsKey(key)){
            List<String> temp = dictionary.get(key);
            temp.add(value);
            dictionary.remove(key);
            dictionary.put(key,temp);
            
        }
        else
        {
            List<String> temp = new ArrayList<String>();
            temp.add(value);
            dictionary.put(key, temp);
        }
    }
    
    public List<String> Get(String key)
    {
        if (dictionary.containsKey(key))
        {
            return dictionary.get(key);
        }
        else
        {
            return null;
        }
    }
}
